package com.atguigu.chapter05.Source;

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * TODO
 *
 * @author cjp
 * @version 1.0
 * @date 2021/3/3 14:19
 */
public class Flink02_File {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        // TODO Source - 从文件读
        env
                .readTextFile("input/sensor.csv")
//                .readFile(, )    // 第一个参数：输入格式，，第二个参数：文件路径
//                .socketTextStream("主机名", 端口)
                .print();



        env.execute();
    }
}
